namespace EFMLEditor
{
    using System.Windows.Forms;

    using Creek.Extensibility.Plugins;

    using Editor.Contracts;
    using Editor.Contracts.Menu;

    /// <summary>
    /// 	Implements IEditorApplication and provides a container/manager for plug-ins
    /// </summary>
    [PlugInApplication("Editor")]
    internal class EditorPlugInManager : PlugInBasedApplication<IEditorPlugIn>, IEditorApplication
    {
        private readonly Form1 f;

        public EditorPlugInManager(Form1 f)
        {
            this.f = f;
        }

        #region Implementation of IEditorApplication

        public Control FindControl(string name)
        {
            return this.f.FindControl(name);
        }

        public Form GetWindow(string name)
        {
            return this.f.GetWindow(name);
        }

        public ToolStripMenuItem GetMenu(string name)
        {
            return this.f.GetMenu(name);
        }

        #endregion
    }
}